﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
/// <summary>
///AddResume 的摘要说明
/// </summary>
public class AddRe
{
	public AddRe()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    private SqlCommand cmd;
    public string addRe(string sql)
    {
        string result = "0";
        try
        {
            cmd = new SqlCommand(sql, ConDB.GetOpen());
            int i = cmd.ExecuteNonQuery();
            if (i > 0)
            {
                result = "1";
            }
        }
        catch (Exception ee)
        {

            throw;
        }
        finally {
            ConDB.Close();
        }
        return result;
    }
    public Boolean selRe(string sql)
    {
        Boolean result = false;
        try
        {
            cmd = new SqlCommand(sql, ConDB.GetOpen());
            result = cmd.ExecuteReader().HasRows;
        }
        catch (Exception ee)
        {

            throw;
        }
        finally
        {
            ConDB.Close();
        }
        return result;
    }
}
